<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>ss</title>
    <script language="JavaScript" th:src="@{'/webjars/jquery/3.3.1/dist/jquery.min.js'}"></script>
    <link rel="stylesheet" th:href="@{'/webjars/font-awesome/4.7.0/css/font-awesome.css'}">
</head>
<body class="layui-layout layui-layout-admin">

<ul class="layui-nav" lay-filter="" th:fragment="top">
    <li class="layui-nav-item">
        学生评优评先系统
    </li>
    <li class="layui-nav-item" th:if="${session.user} ne null">
        <a href="javascript:;">学生信息管理</a>
        <!-- 二级菜单 -->
        <dl class="layui-nav-child">
            <dd>
                <a th:href="@{'/student/to/stuInfo/get'}"
                   class="layui-icon layui-icon-read"> 学生信息查询
                </a>
            </dd>
            <dd>
                <a th:href="@{'/student/to/stuAdd/get'}"
                   data-th-if="${session.user.userType} eq '管理员'"
                   class="layui-icon layui-icon-add-1"> 学生信息添加
                </a>
            </dd>
            <dd>
                <a th:href="@{'/student/to/importStu/get'}"
                   data-th-if="${session.user.userType} eq '管理员'"
                   class="layui-icon layui-icon-upload">
                    <cite>批量导入学生信息</cite>
                </a>
            </dd>
        </dl>
    </li>
    <li class="layui-nav-item" th:if="${session.user} ne null">
        <a href="javascript:;">学生成绩管理</a>
        <!-- 二级菜单 -->
        <dl class="layui-nav-child">
            <dd><a th:href="@{'/mark/to/markInfo/get/get'}"
                   class="layui-icon layui-icon-read">
                成绩信息查询</a></dd>
            <dd><a th:href="@{'/mark/to/markAdd/get/get'}"
                   data-th-if="${session.user.userType} ne '学生'"
                   class="layui-icon layui-icon-add-1"> 成绩信息添加
            </a>
            </dd>
            <dd><a th:href="@{'/mark/to/importMark/get/get'}"
                   data-th-if="${session.user.userType} ne '学生'"
                   class="layui-icon layui-icon-upload">
                批量导入成绩</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item" th:if="${session.user} ne null">
        <a href="javascript:;">评选信息管理</a>
        <!-- 二级菜单 -->
        <dl class="layui-nav-child">
            <dd><a th:href="@{'/info/to/info/get'}" class="layui-icon layui-icon-read"> 评选信息查询</a></dd>
            <dd><a th:href="@{'/info/to/infoAdd/get'}"
                   data-th-if="${session.user.userType} eq '管理员'" class="layui-icon layui-icon-add-1">
                评选信息发布</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item" th:if="${session.user} ne null">
        <a data-th-href="@{'/user/to/importUser'}" th:if="${session.user.userType} eq '管理员'">导入登录信息</a>
    </li>
    <!--<li class="layui-nav-item layui-col-lg-offset8"-->
    <!--data-th-if="${session.user} eq null"><a th:href="@{'/user/to/register'}">注册</a></li>-->
    <li class="layui-nav-item layui-col-lg-offset8" th:if="${session.user} eq null"><a
            th:href="@{'/user/to/login'}">登录</a></li>
    <li class="layui-nav-item layui-col-lg-offset3" th:unless="${session.user} eq null">
        <a href="javascript:;" class="layui-icon layui-icon-user">
            <span th:text="${session.user.userId}"></span>
        </a>
        <dl class="layui-nav-child">
            <dd>
                <a th:href="@{'/user/to/changePassword'}" class="layui-icon layui-icon-set">
                    <span th:text="修改密码"></span>
                </a>
            </dd>
        </dl>
    </li>
    <li class="layui-nav-item"
        th:if="${session.user} ne null">
        <a data-th-if="${session.user.userType} eq '管理员'"
           th:href="@{'/user/to/register'}">
            <i class="fa fa-registered"></i>
            注册</a></li>
    <li class="layui-nav-item" th:unless="${session.user} eq null">
        <a th:href="@{'/user/signOut'}"><i class="fa fa-sign-out"></i> 登出</a>
    </li>
</ul>

<div class="layui-footer footer layui-col-lg-offset5" th:fragment="footer">
    <br>
    <i class="fa fa-copyright"></i> Copyright 2018
</div>

</body>
</html>